import { defineStore } from 'pinia';
import type { PersistenceOptions } from 'pinia-plugin-persistedstate';
interface ISystemState {
  sidebarExpanded: boolean;
}
export const useSystemStore = defineStore('system', {
  state: (): ISystemState => ({
    sidebarExpanded: true, // 是否展开侧边栏
  }),
  actions: {
    setSidebarExpanded(expanded: boolean) {
      this.sidebarExpanded = expanded;
    },
  },
  persist: true,
});
